package com.hdoit.kylin.web.group.modelconfig;

import com.hdoit.kylin.web.user.provider.TeacherProvider;
import com.tennetcn.component.attribute.DateTimeAttribute;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author luozhicheng
 * @email
 * @createtime 2017年07月26日 19:19:25
 * @comment
 */
public class LessonTrainConfig extends ModelMetadataAttributeConfiguration {
	public LessonTrainConfig() {
		this.setProperty("lessonName")
				.hasAttribute(new DisplayNameAttribute("课程名"))
				.hasAttribute(new RequiredAttribute("课程名为必填项"));
		this.setProperty("dutyId")
			.hasAttribute(new DisplayNameAttribute("讲课人"))
			.hasAttribute(new RequiredAttribute("讲课人为必选"))
			.hasAttribute(new DropDownListAttribute(new TeacherProvider("dutyId")));
		this.setProperty("comments").hasAttribute(
				new DisplayNameAttribute("课程描述"));
		this.setProperty("planDate")
				.hasAttribute(new DisplayNameAttribute("计划上课时间"))
				.hasAttribute(new DateTimeAttribute());

	}
}